This script uses PPPop to open a PPP link, uses Eudora to check for new mail (and upload queued mail), and finally closes the PPP link only if the script established the PPP connection.